# include <stdio.h>
int main ()
{
	int i,j,n;
	char a[100],b[100];
	for (i=0;(a[i]=getchar())!='\n';i++);
	for (j=0;(b[j]=getchar())!='\n';j++);
	scanf("%d",&n);
	if (n<=j)
	{
		for (i=0;a[i]!='\n';i++)
		printf("%c",a[i]);
		for (j=0;j<n;j++)
		printf("%c",b[j]);
    }
    else
    {
        for (i=0;a[i]!='\n';i++)
		printf("%c",a[i]);
		for (j=0;b[j]!='\n';j++)
		printf("%c",b[j]);
		//printf("%d",n);
			
	}
	return 0;
}
